1. Field of the Invention
The present invention relates to a recording apparatus, a recording method, and a recording program, which are capable of efficiently recording stream data resulting from multiplexing of video data and audio data on a recording medium.
2. Description of the Related Art
Hitherto, digital versatile disks (DVDs) each having a recording capacity of 4.7 GB or more are in widespread use as recording media on which data can be recorded, which are removable from recording-playback apparatuses, which have relatively high recording capacities, and which are suitable for recording of audio-video data (AV data) consisting of audio data and video data. Japanese Unexamined Patent Application Publication No. 2004-350251 discloses an image pickup apparatus that records data on a digital versatile disk recordable (DVD-R) in a DVD-Video format.
Such DVD-Rs have file systems in Universal Disk Format (UDF) and can be accessed by computer apparatuses supporting the UDF. The UDF includes a format according to International Organization for Standardization (ISO) 9660, and various file systems used in the computer apparatuses adopt the UDF. Recording video data, for example, captured by image pickup apparatuses and audio data yielded by the image pickup as files on such DVD-Rs increases the affinity between the image pickup apparatuses and other apparatuses including computer apparatuses. As a result, the recorded data can be efficiently used.
FIG. 14 is a block diagram schematically showing a process of recording video data and audio data on a recording medium in related art. Referring to FIG. 14, a signal processing unit 100 receives video data and audio data. A video encoder 110 in the signal processing unit 100 compresses and encodes the video data and supplies the video data to a multiplexed stream generator 111. An audio encoder 112 in the signal processing unit 100 compresses and encodes the audio data and supplies the audio data to the multiplexed stream generator 111. The multiplexed stream generator 111 multiplexes the supplied video data and audio data and outputs one data stream. This data stream is supplied to a disk drive 101. An error correction coder 113 in the disk drive 101 performs error correction coding to the data stream and a recording processor 114 in the disk drive 101 performs recording encoding, modulation, and so on to the data stream to generate a recording signal. The recording signal is recorded on a disk 102, such as a DVD-R.
A minimum physical management unit on the DVD-R is a sector and the data size of one sector is equal to 2 KB. Specifically, the data size of one sector is equal to 2,048 bytes. In other words, the data is recorded on the disk 102 in a minimum unit of 2,048 bytes.
A control unit (not shown) applies a predetermined file system to the data stream recorded on the disk 102. For example, the file system writes address information concerning the data stream in a management area on the disk 102 to indicate how the file system accesses the data stream recorded on the disk 102.
The multiplexing in the multiplexed stream generator 111 will now be briefly described. Methods of multiplexing video data and audio data include application of transport streams defined in Moving Pictures Experts Group (MPEG) systems. In the transport streams in the MPEG systems, data is divided into packets that are subjected to time division multiplexing to provide one data stream in which video data and audio data is multiplexed.
Specifically, video data and audio data are respectively divided into predetermined sizes and headers storing information concerning, for example, decoding times and output times are added to the divided video data and audio data to form packetized elementary stream (PES) packets. Each PES packet is divided into predetermined sizes and headers storing information indicating data types are added to the divided PES packet to form transport stream (TS) packets each having a data size of 188 bytes. Multiple TS packets form one data stream.
A header of a predetermined size may be added to the TS packet and the TS packet to which the header is added may be recorded as a stream having unique specifications. For example, a header of four bytes is added to the TS packet to form a packet having a data size of 192 bytes.
In this case, 32 packets each having a data size of 192 bytes have a total data size of 6,144 bytes (6 KB). The 32 packets have a data size that is an integral multiple of the data size, which is 2,048 bytes (2 kB), of one sector on a DVD-R. Accordingly, the data can be efficiently recorded on the disk 102 in units of 32 packets each having a data size of 192 bytes. The unit of 6 KB, which corresponds to 32 packets each having a data size of 192 bytes, is hereinafter referred to as a signal-processing side data unit for convenience.
The error correction coding in the error correction coder 113 will now be briefly described. In recording of data on a recording medium, an error correction code is added to the data to perform the error correction coding. An encoding process using product codes is generally used for the error correction coding. For example, an outer code parity is generated for pieces of data, which are arranged in a matrix form in units of one symbol (for example, one byte) on a memory, in the column direction of the data on the basis of, for example, Reed Solomon product codes. Then, an inner code parity is generated for the data and the generated outer code parity in the row direction thereof to perform the error correction coding using the product codes. A data block generated by the error correction coding using the product codes is called an error correction coding (ECC) block.
It is efficient to determine the size of the ECC block in accordance with the minimum physical management unit on the recording medium and to record data on the recording medium in units of the ECC blocks. FIG. 15 shows an example of the relationship between sectors each being the minimum physical management unit on a DVD-R and ECC blocks. In the example in FIG. 15, one ECC block corresponds to 16 sectors and has a data size of 32 KB. In other words, the ECC block serves as a substantial access unit on a recording medium. The unit based on the data size of the ECC block is hereinafter referred to as a recording side data unit for convenience.